﻿using System;
using System.Collections.Generic;

using System.Text;

namespace DoxygenBrowser.Common.Model
{
  public class TokenIdentifier
  {
    public const string CONST_CL = "cl";
    public const string CONST_CLASS = "cl";
    public const string CONST_CLASS_MEMBER = "clm";
    public const string CONST_CLM = "clm";
    public const string CONST_DATA = "data";
    public const string CONST_ECONST = "econst";
    public const string CONST_EVENT = "event";
    public const string CONST_FFUNC = "ffunc";
    public const string CONST_FILE = "file";
    public const string CONST_FUNC = "func";
    public const string CONST_INTF = "intf";
    public const string CONST_INTFM = "intfm";
    public const string CONST_MACRO = "macro";
    public const string CONST_PROPERTY = "property";
    public const string CONST_TDEF = "tdef";
    public const string CONST_TMPLT = "tmplt";



    private string _name;
    public string Name 
    {
      get { return _name; }
      set { _name = value; }
    }
    
    private string _apiLanguage;
    public string APILanguage 
    {
      get { return _apiLanguage; }
      set { _apiLanguage = value; } 
    }

    private string _type;
    public string Type 
    {
      get { return _type; }
      set { _type = value; }
    }

    private string _scope;
    public string Scope 
    {
      get { return _scope; }
      set { _scope = value; }
    }

    public string GetNormName()
    {
      string strNormName = string.Empty;

      switch (this.Type)
      {
        case CONST_CLASS_MEMBER:
        case CONST_PROPERTY:
        case CONST_FUNC:
        case CONST_DATA:
        case CONST_EVENT:
        case CONST_ECONST:
        case CONST_FFUNC:
        case CONST_INTF:
        case CONST_INTFM:
          strNormName = this.Scope + "::" + this.Name;
          break;          
        case CONST_CLASS:
          strNormName = this.Name;
          break;
        case CONST_FILE:
          break;
        case CONST_MACRO:
        case CONST_TDEF:
        case CONST_TMPLT:
          break;
      }
      return strNormName;
    }
  }
}